package controls.visu;

import gui.visu.components.ValuePanel;



import data.Constants;
import data.visu.DisplayDataList;
import data.visu.enums.E_BinaryTypes;


/**
 * @author Charles Perin
 * 29 mars 2011
 * LIMSI - INRIA Rennes
 * charles.perin@free.fr
 *
 */
public class BinaryCompareControl extends BinaryControl{


	private BinaryControl binaryControler1;
	private BinaryControl binaryControler2;

	private int mode;

	public BinaryCompareControl(String name, DisplayDataList displayDataList, BinaryControl binaryControler1, BinaryControl binaryControler2, E_BinaryTypes type, int mode) {
		super(name,Constants.DISPLAY_DATA_DEFAULT_COLOR,displayDataList,type);
		this.setMode(mode);

		setBinaryControler1(binaryControler1);
		setBinaryControler2(binaryControler2);
		setxMinView(displayDataList.getxMinView());
		setxMaxView(displayDataList.getxMaxView());
		ValuePanel valuePanel = new ValuePanel(this);
		setValuePanel(valuePanel);
		
		//superposition des binary
		if(mode!=Constants.DISPLAY_COMPARE_SUPERPOSE)System.err.println("BinaryCompareControl: Seul mode possible = superposition");
		setDataSet(null);
	}



	public void setBinaryControler1(BinaryControl curveControler1) {
		this.binaryControler1 = curveControler1;
	}

	public BinaryControl getBinaryControler1() {
		return binaryControler1;
	}

	public void setBinaryControler2(BinaryControl binaryControler2) {
		this.binaryControler2 = binaryControler2;
	}

	public BinaryControl getBinaryControler2() {
		return binaryControler2;
	}

	public void setMode(int mode) {
		this.mode = mode;
	}

	public int getMode() {
		return mode;
	}

}
